﻿<Window x:Class="WpfTestApplication.DataGridTestWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    
    xmlns:System="clr-namespace:System;assembly=mscorlib"
    xmlns:WpfTestApplication="clr-namespace:WpfTestApplication"        
    Title="DataGridTestWindow" Height="528" Width="552" DataContext="{Binding RelativeSource={RelativeSource Self}}">
    <Grid>
        <Label Height="28" Margin="12,12,0,0" Name="label3" VerticalAlignment="Top" HorizontalAlignment="Left" Width="120">Ordinary DataGrid</Label>
        <my:DataGrid ItemsSource="{Binding GameCollection}"  AutoGenerateColumns="False" Margin="12,46,12,0" Name="dataGrid" xmlns:my="http://schemas.microsoft.com/wpf/2008/toolkit" Height="173" VerticalAlignment="Top" IsReadOnly="True">
            <my:DataGrid.Columns>
                <my:DataGridTextColumn Binding="{Binding GameName}" Header="Game Name" Width="160" />
                <my:DataGridTextColumn Binding="{Binding Creator}" Header="Creator" Width="90" />
                <my:DataGridTextColumn Binding="{Binding Publisher}" Header="Publisher" Width="100" />
            </my:DataGrid.Columns>
        </my:DataGrid>
        <my:DataGrid ItemsSource="{Binding GameCollection}" AutoGenerateColumns="False" Margin="12,272,12,0" Name="dataGridFancy" xmlns:my="http://schemas.microsoft.com/wpf/2008/toolkit" Height="171" VerticalAlignment="Top" SelectionUnit="CellOrRowHeader">
            <my:DataGrid.Columns>
                <my:DataGridTextColumn Binding="{Binding GameName}" Header="Game Name" Width="160" />
                <my:DataGridTextColumn Binding="{Binding Creator}" Header="Creator" Width="90" />
                <my:DataGridTextColumn Binding="{Binding Publisher}" Header="Publisher" Width="100" />
                <my:DataGridCheckBoxColumn Binding="{Binding Multiplayer}"  Header="Multiplayer" Width="100" IsReadOnly="True" />
            </my:DataGrid.Columns>
        </my:DataGrid>
        <Label Height="28" HorizontalAlignment="Left" Margin="12,238,0,0" Name="label1" VerticalAlignment="Top" Width="120">Fancy DataGrid</Label>
    </Grid>
</Window>
